
bl_info = {
    "name": "OS/SL Package",
    "author": "Tom Ernst",
    "version": (2, 1, 1),
    "blender": (2, 93, 0),
    "location": "Blender Addons",
    "description": "OS/SL Package",
    "warning": "",
    "doc_url": "https://rOWLplay.net/blender/addons/OSSL.ashx",
    "category": "Development",
}

import sys, importlib

if __name__ == "__main__":
    import ossl.util as util
    util.reset_addon()
else:
    if "bpy" in locals():
        importlib.reload(sys.modules["ossl.util"])
    else:
        import bpy
        from . import util
    import bpy, ossl.util as util
    
    def register():
        print("\nregistering: OSSL package")
        util.register()
        util.imports("ossl", "resources")
        util.imports("ossl", "menu")
        util.imports("ossl", "formats")
        util.imports("ossl", "_types")
        util.imports("ossl", "preferences")
        util.imports("ossl", "update")
        print("registered: OSSL package\n")
        import ossl.update as update
        update.start()

    def unregister():
        import ossl.update as update
        update.stop()
        print("\nunregistering: OSSL package")
        util.release("ossl", "update")
        util.release("ossl", "preferences")
        util.release("ossl", "_types")
        util.release("ossl", "formats")
        util.release("ossl", "menu")
        util.release("ossl", "resources")
        util.unregister()
        print("invalidating cache: OSSL package")
        importlib.invalidate_caches()
        print("invalidated cache: OSSL package")
        print("unregistered: OSSL package\n")

